Timeline: An HTN Planner that can Reason about Time
نویسندگان
چکیده
In this paper we present a formalism for explicitly representing time in HTN planning. Actions can have durations and intermediate effects in this formalism. Methods can specify qualitative and quantitative temporal constraints on decompositions. Based on this formalism we defined a planning algorithm TimeLine that can produce concurrently executable plans in the presence of numeric state variables. We state and prove the soundness of the algorithm. We also present the experimental results of the TimeLine implementation that shows the feasibility of our approach. Introduction Actions with different durations, simultaneous action execution and reasoning with metric quantities are three characteristic of real-world planning problems. Recently studies on artificial intelligence planning concentrated on developing formalisms for representing time and creating temporal plans. The planning domain definition language (PDDL 2.1) for AIPS 2002 planning competition can define actions with durations, and address the concurrency issues in the presence of numeric state variables. The difficulty aroused with concurrency is to control the overlapping action executions. The problem gets more complicated when there are limited number of shared resources. When resources are identified and resource needs for every action are explicitly defined, then two actions with conflicting resource requirements can be defined as mutually exclusive. In this approach the search space can be pruned effectively if it’s accompanied by good resource management techniques. The more general case is when there are numeric state variables that can be updated concurrently. Numeric state variables can be used to represent resources but not every numeric variable can be seen as a resource. Numeric computations and time can be handled easily by HTN planners. For this reason HTN planners are conveniently used for practical applications. In this paper we present a formalism for explicitly representing time in HTN planning. Actions can have durations and intermediate effects in this formalism. Methods can specify qualitative and quantitative temporal constraints on decompositions. Based on this formalism we defined a planning algorithm that can produce concurrently executable plans in the presence of numeric state variables. We state and prove the soundness of the algorithm. We also present the experimental results of the implementation that shows the feasibility of our approach. Formalism Performing numerical computations is an important issue for real-world problems. Some HTN planners like SHOP have already incorporated this functionality. Resources generally represent some features in the domain that are limited in number, like space available in a truck. Even though numeric state variables can be used to represent these resources, the opposite need not to be true. For example, let’s say the distance between two cities A and B is 6 units and there is a truck T that has a speed of 2 units per unit time. If T is at A and will travel to B then as T moves, the distance between A and the current location of T increases ( see dist(A,T) in Figure 1 ). Similarly travel time left to B is a numeric variable (see timeTo (T,B) in Figure 1). We believe these two numeric variables do not represent any resources. Therefore, instead of identifying the resources and defining operations on these resource, we will go with the more general way and define concurrent update rules for numeric state variables. Figure 1: Dist(A,T) is distance between A and current location of truck T, TimeTo(T,B) is time left to reach B The value of a numeric variable can be assigned to a constant, decreased or increased by constant amount. We define assignment operations on the same variable at the same time, as mutually exclusive updates. Therefore we don’t allow two assignment operations on the same variable at the same time, even though the assigned values are same. Concurrent increase and decrease operations on the same numeric variable can be permitted as long as the value of the variable stays in the defined range in all intermediate states produced by any permutation of these operations. Since addition and subtraction are commutative operations, the result of the any permutation will be the same. To ensure that the value always stays in the range, it is enough to check pessimistic cases in which all increase or all decrease operations are performed first. State, Agenda, Operator Definition 1: State is a collection of positive ground atoms of the form (p t1 t2 .. tn) where p is the predicate name and t1 to tn are argument terms. Value of a numeric state variable is represented by an atom of the form (= variable value) where variable is the numeric state variable and value is the value of the variable in this state. A valid state can not contain both (= variable value1) and (= variable value2). Main elements of HTN planning are simple tasks and composite tasks. Operators define a set of changes in the current state in order to achieve simple tasks. Composite tasks can be achieved by decomposing them into subtasks and then achieving these subtasks. Methods define decompositions for composite tasks. Classical HTN operators have a precondition to hold in the state just before the operator is applied. Operators have effects which will be true in the next state of the world. We extend this definition to represent operators that may have a duration of more than one unit time. We do not require the precondition of an operator to hold through out the execution. Effects of an operator can not change the state in which it’s precondition is evaluated. We eliminated instant effects because they make it hard to trace the deleted precondition interactions. This way we always evaluate the preconditions in a stable state. We let the operators have effects at intermediate time points, not only at the end so the operators may represent gradual changes in the successor states. Effects are the promises that will be true in a successor state. Effects may assign a value to a numeric state variable, increase or decrease the value of a numeric state variable, add or delete an atom in or from the state. Definition 2: An operator has the following form (:operator head precondition effect-list ) where head is a simple task, precondition is a conjunctive expression and effect-list is a list of timed effects. Timed effects can be in one of the following forms: ( [time1](e1. . . .en))or ( [time2,time3](e1. . . .en)) where ei’s are effects and the intended meaning of first form is ei’s will be true at (start time of operator + time1). The intended meaning of the second form is ei’s will be true in the states associated with inclusive time interval [start time + time2, start time + time1]. In this notation time1, time2 and time3 should be positive integers or numeric expressions. If the result of the numeric expression is not an integer we take the ceiling of the result. More over time3 should be greater than or equal to time2. (:operator (!drive ?truck ?loc-from ?loc-to)
منابع مشابه
Task Interaction in an HTN Planner
Hierarchical Task Network (HTN) planning uses task decomposition to plan for an executable sequence of actions as a solution to a problem. In order to reason effectively, an HTN planner needs expressive domain knowledge. For instance, a simplified HTN planning system such as JSHOP2 uses such expressivity and avoids some task interactions due to the increased complexity of the planning process. ...
متن کاملPlanning in Dynamic Environments: Extending HTNs with Nonlinear Continuous Effects
Planning in dynamic continuous environments requires reasoning about nonlinear continuous effects, which previous Hierarchical Task Network (HTN) planners do not support. In this paper, we extend an existing HTN planner with a new state projection algorithm. To our knowledge, this is the first HTN planner that can reason about nonlinear continuous effects. We use a wait action to instruct this ...
متن کاملA Flexible ANML Actor and Planner in Robotics
Planning in robotics must be considered jointly with Acting. Planning is an open loop activity which produces a plan, based on action models, the current state of the world and the desired goal state. Acting, on the other hand, is a closed loop on the environment activity (to execute command and perceive the state of the world). These two deliberative activities must be integrated and need to h...
متن کاملHierarchical Task Planning under Uncertainty
In this paper we present an algorithm for planning in nondeterministic domains. Our algorithm C-SHOP extends the successful classical HTN planner SHOP, by introducing new mechanisms to handle situations where there is incomplete and uncertain information about the state of the environment. Being an HTN planner, C-SHOP supports coding domain-dependent knowledge in a powerful way that describes h...
متن کاملFrom Task Definitions and Plan Traces to HTN Methods
Hierarchical Task Network (HTN) planning is an important, frequently studied research topic in artificial intelligence. Researchers have reported work on its formalisms and applications (Erol, Hendler, & Nau 1994; Smith, Nau, & Erol 1998; Nau et al. 2005). In HTN planning, complex tasks are decomposed into simpler tasks until a sequence of primitive actions is generated. HTN planning is frequen...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2002